var fs = require('fs');
var parser = require('xml2json');

exports.xmlFileToJson = function(path, callback) {
    var xml = fs.readFileSync(path, "utf8");
    var json = parser.toJson(xml);
    callback(json);
}